/* 全局容器样式 */
.userInfoContainer,
.container {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 标题样式 */
.sectionTitle,
.title {
  text-align: left;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.title {
  text-align: center;
  margin-bottom: 2rem;
}

/* 主布局 */
.mainLayout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* 侧边栏样式 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profileCard,
.menuCard,
.contentArea {
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
}

.contentArea {
  display: flex;
  flex-direction: column;
}

.profileCard {
  text-align: center;
}

.menuCard {
  padding: 0;
}

/* 头像相关样式 */
.avatarContainer {
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin: 0 auto;
}

.avatarWrapper {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatarContainer:hover .avatarWrapper {
  transform: scale(1.02);
  border-color: rgba(116, 123, 255, 0.5);
  box-shadow: 0 6px 16px rgba(116, 123, 255, 0.3);
}

.userAvatar,
.avatar {
  transition: all 0.3s;
  /* border: 1px dashed #d9d9d9; */
}

.userAvatar:hover,
.avatarWrapper:hover .avatar {
  transform: scale(1.05);
  border-color: #1890ff;
}

.avatarImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.defaultAvatarIcon {
  font-size: 80px;
  color: rgba(255, 255, 255, 0.8);
}

/* 头像覆盖层和悬停文本 */
.avatarOverlay,
.uploadOverlay,
.avatarHoverText {
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
}

.avatarOverlay,
.uploadOverlay {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.avatarHoverText {
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
}

.avatarContainer:hover .avatarOverlay,
.avatarWrapper:hover .uploadOverlay,
.avatarWrapper:hover .avatarHoverText {
  opacity: 1;
}

/* 图标和上传文本 */
.cameraIcon,
.uploadIcon svg {
  font-size: 32px;
  color: white;
  margin-bottom: 8px;
  transition: transform 0.3s;
}

.uploadIcon svg {
  height: 60px;
  fill: #e8e8e8;
}

.uploadArea:hover .uploadIcon svg {
  transform: translateY(-5px);
}

.uploadText {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

/* 上传区域 */
.uploadArea {
  height: 200px;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  cursor: pointer;
  /* border: 1px dashed #e8e8e8; */
  background-color: #212121;
  padding: 1.5rem;
  border-radius: 10px;
  transition: all 0.3s;
  margin-top: 1rem;
}

.uploadArea:hover {
  border-color: #747bff;
  box-shadow: 0 0 10px rgba(116, 123, 255, 0.3);
}

/* 菜单列表 */
.menuList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.listItem {
  display: block;
  padding: 1rem;
  color: white;
  text-decoration: none;
  transition: all 0.25s;
  border-left: 3px solid transparent;
}

.listItem:hover,
.listItem:focus {
  background-color: #747bff;
  border-left-color: #fff;
  outline: none;
}

/* 表单样式 */
.profileForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.formLabel {
  display: block;
  color: #fff;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.label {
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
}

.labelTitle {
  min-width: 4em;
  color: #aaa;
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
}

.labelValue {
  color: #fff;
  margin-left: 1rem;
  font-weight: normal;
}

.emailText {
  color: #fff;
  margin: 0;
}

.editIcon {
  color: #747bff;
  cursor: pointer;
  font-size: 16px;
  margin-left: auto;
  transition: color 0.3s;
}

.editIcon:hover {
  color: #40a9ff;
}

/* 按钮组 */
.buttonGroup {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submitButton {
  background-color: #747bff;
  border-color: #747bff;
  min-width: 120px;
  height: 40px;
  font-weight: 500;
}

.submitButton:hover {
  background-color: #636af7 !important;
  border-color: #636af7 !important;
}

.cancelButton {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  min-width: 120px;
  height: 40px;
}

.cancelButton:hover {
  border-color: #747bff;
  color: #747bff;
  background-color: rgba(116, 123, 255, 0.1);
}

/* 隐藏的元素 */
.hiddenInput,
.fileInput {
  display: none;
}

/* 加载状态 */
.loadingContainer {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #f5f5f5;
}

/* 用户信息 */
.userInfo {
  text-align: center;
}

.userInfo h2,
.username {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
}

.userInfo h2 {
  color: #333;
}

.userInfo p {
  margin: 0.5rem 0 0;
  color: #666;
}

/* 说明区域 */
.instructions {
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.instructions h4 {
  margin-top: 0;
  color: #333;
}

.instructions ul {
  padding-left: 1.5rem;
  color: #666;
}

/* 上传部分 */
.uploadSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.uploadText span {
  display: block;
  font-weight: 500;
  color: #e8e8e8;
  margin-bottom: 0.5rem;
}

.uploadText small {
  color: #aaa;
  font-size: 0.8rem;
}

.instructions {
  margin-top: auto;
  background-color: transparent;
  font-size: 12px;
  color: #666;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .mainLayout {
    grid-template-columns: 3fr 7fr;
  }
}
